package com.pz.cloud.framework.stdGroup.callback;

import com.pz.cloud.framework.business.researchProj.cons.ProjectStepEnum;
import com.pz.cloud.framework.business.stdGroup.entity.OrgStdGroup;
import com.pz.cloud.framework.business.stdGroup.service.IOrgStdGroupService;
import com.pz.cloud.framework.business.workflow.model.BaseTaskCallback;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
@Slf4j
public class OrgStdGroupCallback extends BaseTaskCallback<OrgStdGroup, IOrgStdGroupService> {

    @Override
    public void callback(OrgStdGroup obj) {
        log.info("receive callback: {}", obj);
        if (processInfo.processEnd()) {
            obj.setBuildTime(new Date());
            service.save(obj);
        }
    }
}
